package com.atguigu.gulimall.cart.feign;

import com.atguigu.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.List;

@FeignClient("gulimall-product")
public interface SkuFeignService {
    @RequestMapping("/product/skuinfo/info/{skuId}")
    //@RequiresPermissions("product:skuinfo:info")
    R info(@PathVariable("skuId") Long skuId);

    @GetMapping("/product/skuinfo/getSkuAttrListToString")
    List<String> getSkuAttrListToString(@RequestParam("skuId") Long skuId);

    @GetMapping("/product/skuinfo/{skuId}/getPrice")
     BigDecimal getPrice(@PathVariable("skuId") Long skuId);
}
